%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/rbac.createPerson"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 18, 19, 2<br /><br />1: PgInsertSingle[15]<br />2: <br />ᐳ: Object[20]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 2, 15, 20<br /><br />ROOT Object{1}ᐸ{result}ᐳ[20]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 15, 31<br /><br />ROOT PgInsertSingle{1}ᐸperson()ᐳ[15]<br />1: <br />ᐳ: 22, 21, 23, 24, 25, 26, 27<br />2: PgSelect[28]<br />3: PgSelectRows[33]<br />ᐳ: First[32], PgSelectSingle[34]"):::bucket
    Bucket4("Bucket 4 (nullableBoundary)<br />Deps: 34, 15<br /><br />ROOT PgSelectSingle{3}ᐸfrmcdc_wrappedUrlᐳ[34]"):::bucket
    Bucket5("Bucket 5 (listItem)<br /><br />ROOT __Item{5}ᐸ24ᐳ[35]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket3
    Bucket3 --> Bucket4 & Bucket5

    %% plan dependencies
    __InputObject8{{"__InputObject[8∈0] ➊<br />More deps:<br />- Constantᐸ'Jane Doe'ᐳ[37]<br />- Constantᐸ[ 'Jay Doe', 'JD' ]ᐳ[10]<br />- Constantᐸ'Unknown'ᐳ[38]<br />- Constantᐸ'jane.doe@example.com'ᐳ[39]"}}:::plan
    __InputObject13{{"__InputObject[13∈0] ➊<br />More deps:<br />- Constantᐸ'http://example.com'ᐳ[40]"}}:::plan
    __InputObject13 --> __InputObject8
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject8 --> __InputObject6
    Object18{{"Object[18∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access16{{"Access[16∈0] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access17{{"Access[17∈0] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access16 & Access17 --> Object18
    ApplyInput19{{"ApplyInput[19∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput19
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ<br />Dependents: 4"]:::plan
    PgInsertSingle15[["PgInsertSingle[15∈1] ➊<br />ᐸperson()ᐳ"]]:::sideeffectplan
    Object18 & ApplyInput19 --> PgInsertSingle15
    Object20{{"Object[20∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgInsertSingle15 --> Object20
    Object31{{"Object[31∈2] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access29{{"Access[29∈2] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access30{{"Access[30∈2] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access29 & Access30 --> Object31
    PgSelect28[["PgSelect[28∈3] ➊<br />ᐸfrmcdc_wrappedUrlᐳ"]]:::plan
    PgClassExpression27{{"PgClassExpression[27∈3] ➊<br />ᐸ__person__.”site”ᐳ"}}:::plan
    Object31 & PgClassExpression27 --> PgSelect28
    PgClassExpression21{{"PgClassExpression[21∈3] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    Access22{{"Access[22∈3] ➊<br />ᐸ15.tᐳ"}}:::plan
    Access22 --> PgClassExpression21
    PgInsertSingle15 --> Access22
    PgClassExpression23{{"PgClassExpression[23∈3] ➊<br />ᐸ__person__...full_name”ᐳ"}}:::plan
    PgClassExpression21 o--o PgClassExpression23
    PgClassExpression24{{"PgClassExpression[24∈3] ➊<br />ᐸ__person__.”aliases”ᐳ"}}:::plan
    Access22 --> PgClassExpression24
    PgClassExpression25{{"PgClassExpression[25∈3] ➊<br />ᐸ__person__.”about”ᐳ"}}:::plan
    PgClassExpression23 o--o PgClassExpression25
    PgClassExpression26{{"PgClassExpression[26∈3] ➊<br />ᐸ__person__.”email”ᐳ"}}:::plan
    PgClassExpression25 o--o PgClassExpression26
    Access22 --> PgClassExpression27
    First32{{"First[32∈3] ➊"}}:::plan
    PgSelectRows33[["PgSelectRows[33∈3] ➊"]]:::plan
    PgSelectRows33 --> First32
    PgSelect28 --> PgSelectRows33
    PgSelectSingle34{{"PgSelectSingle[34∈3] ➊<br />ᐸfrmcdc_wrappedUrlᐳ"}}:::plan
    First32 --> PgSelectSingle34
    PgClassExpression36{{"PgClassExpression[36∈4] ➊<br />ᐸ__frmcdc_w...rl__.”url”ᐳ"}}:::plan
    PgSelectSingle34 --> PgClassExpression36
    __Item35[/"__Item[35∈5]<br />ᐸ24ᐳ"\]:::itemplan
    PgClassExpression24 ==> __Item35

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,__InputObject8,__InputObject13,Access16,Access17,Object18,ApplyInput19 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgInsertSingle15,Object20 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,Access29,Access30,Object31 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgClassExpression21,Access22,PgClassExpression23,PgClassExpression24,PgClassExpression25,PgClassExpression26,PgClassExpression27,PgSelect28,First32,PgSelectRows33,PgSelectSingle34 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4,PgClassExpression36 bucket4
    classDef bucket5 stroke:#7fff00
    class Bucket5,__Item35 bucket5

    %% implicit side effects
    PgInsertSingle15 -.-o Access29
    PgInsertSingle15 -.-o Access30

